<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_info', function (Blueprint $table) {
            //
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->integer('photo_id')->default(0)->comment('用户头像');
            $table->string('nickname',64)->nullable()->comment('用户昵称');
            $table->string('realname',64)->nullable()->comment('真实姓名');
            $table->tinyInteger('sex')->default(0)->comment('性别，0：保密，1:男，2:女');
            $table->string('constellation',64)->nullable()->comment('星座');
            $table->timestamp('birthday')->nullable()->comment('出生年月日');
            $table->string('id_card')->nullable()->comment('身份证号');
            $table->integer('age')->default(0)->comment('年龄');
            $table->string('e-mail')->nullable()->comment('邮箱');
            $table->string('province',64)->nullable()->comment('省份');
            $table->string('city',64)->nullable()->comment('城市');
            $table->string('area',64)->nullable()->comment('地区');
            $table->string('address')->nullable()->comment('详细地址');
            $table->string('home_province',64)->nullable()->comment('籍贯：省份');
            $table->string('home_city',64)->nullable()->comment('籍贯：城市');
            $table->string('home_area',64)->nullable()->comment('籍贯：地区');
            $table->string('home_address')->nullable()->comment('籍贯：详细地址');
            $table->string('birthplace')->nullable()->comment('籍贯');
            $table->string('graduated_school')->nullable()->comment('毕业院校');
            $table->string('education_level')->nullable()->comment('学历层次');
            $table->string('tag')->nullable()->comment('个人标签');
            $table->string('qq',64)->nullable()->comment('qq');
            $table->string('wechat',64)->nullable()->comment('微信');
            $table->string('description')->nullable()->comment('个人描述');
//            $table->integer('integral')->default(10)->comment('个人积分');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user_info', function (Blueprint $table) {
            //
        });
    }
}
